﻿using HYBY.Task.Service.IService;
using HYBY.WebFrameWork.Controllers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Web.Models;

namespace Web.Controllers
{
    public class StructureController : BaseController
    {
        private readonly ITAStructureService _service;

        private readonly ITADictionariesService _dic_service;

        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="service"></param>
        /// <param name="dic_service"></param>
        public StructureController(ITAStructureService service, ITADictionariesService dic_service)
        {
            _service = service;
            _dic_service = dic_service;
        }
        //组织架构
        // GET: /Structure/
        public ActionResult Index()
        {
            var model = new TAStructureModel();

            //获得字典数据
            model.LiTADictionariesM = _dic_service.GetTADictionariess();
            //获得组织数据
            model.LiTAStructureM = _service.GetTAStructures();

            return View(model);
        }
    }
}